<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    form {
      width: 460px;
      height: 450px;
      background-color: blueviolet;
      position: relative;
      margin: 70px auto;
    }

    h1 {
      text-align: center;
    }

    input[type="text"] {
      height: 40px;
      width: 250px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      outline: none;
    }

    input[type="password"] {
      height: 40px;
      width: 250px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      outline: none;
    }

    .username {
      top: 70px;
    }

    .password {
      top: 130px;
    }

    button {
      width: 140px;
      height: 50px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      background-color: deeppink;
    }

    .regist {
      top: 300px;
    }

    .login {
      top: 220px;
    }
  </style>
</head>

<body>
<form action="/login" method="post">
  <h1>用户登录</h1>
  <input type="text" name="username" placeholder="姓名" class="username" autocomplete="off">
  <input type="password" name="password" placeholder="密码" class="password">
  <button type="submit" class="login">登录</button>
  <a href="regist"><button class="regist">注册</button></a>
</form>
</body>

</html>